import Vue from 'vue'
import App from './App.vue'

Vue.config.productionTip = false

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import axios from 'axios'//引入axios
Vue.prototype.$axios = axios;//把axios挂载到vue上 
import store from '@/store'

import router from '@/router'

import { Message } from 'element-ui'
Vue.use(ElementUI)

// router.beforeEach((to, from, next) => {

//     if (!sessionStorage.getItem("userInfo")) {
//         if (to.path != '/login') {
//             Message({ type: 'error', message: '当前未登录，请先登录' })
//             next('/login')
//         }
//     } else next()
//         // next()
// })


new Vue({
    render: h => h(App),
    store,
    router
}).$mount('#app')